import utils from "../utils/utils";
import Cookies from "js-cookie";

function verity_login_status(call = null) {
    if (call && typeof call === "function") {
        utils.NET.post("/login/verity", {}).then(res => {
            if (res && res.code === 1) {
                Cookies.set("utk",res?.t_ud, {
                    expires: 30
                });
                call(true);
            } else {
                call(false);
            }
        }).catch(() => {
            call(false);
        });
    }
}

export {
    verity_login_status
}